package IO;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

public class FileDemo6 {
    public static void main(String[] args) {
        try(Writer writer=new FileWriter("d:/text.txt")) {

            writer.write("hello world");
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
